const router = require('express').Router()
const db = require('../db.config')

router.get('/getall', (req, res) => {
    let sql = "select * from students"
    db.query(sql, (err, data) => {
        // console.log(data)
        // let data = JSON.parse(JSON.stringify(data))
        res.send(JSON.parse(JSON.stringify(data)))
    })
})
module.exports = router